﻿@model string

@Html.TextBoxFor(model => model, new { @class = "col-md-8", style = "width: 100%;" })

<script>
    $(document).ready(function () {
        $("#@Html.IdForModel()").kendoDropDownList({
            autobind: false,
            optionLabel: "Select category...",
            filter: "startswith",
            dataSource: {
                transport: {
                    read: {
                        url: "@Html.Raw(Url.Action("Category", "Search", new { area = Constants.AreaAdmin, categoryId = Model }))"
                    }
                },
                schema: {
                    data: "Data"
                },
                serverFiltering: true
            },
            dataTextField: "Name",
            dataValueField: "Id",
        });
    });
</script>